package models

import org.joda.time.DateTime

case class Dict(dictCode: String,
                dictName: String,
                dictType: String,
                joinTime: Option[DateTime],
                isDeleted: Boolean = false,
                dictDescription: Option[String] = None,
                id: Option[Int] = None,
                updateTime: Option[DateTime] = None) extends BaseModel {
}

case class DictItem(value: String,
                    display: String,
                    orderNum: Int,
                    joinTime: Option[DateTime],
                    isDeleted: Boolean = false,
                    dictId: Int,
                    updateTime: Option[DateTime] = None,
                    id: Option[Int] = None) extends BaseModel

case class DictQuery(dictCode: Option[String] = None,
                     dictName: Option[String] = None,
                     dictType: Option[String] = None,
                     joinTime: Option[DateTime] = None,
                     joinTimeEnd: Option[DateTime] = None,
                     dictDescription: Option[String] = None,
                     id: Option[Int] = None,
                     page: Option[Int] = None,
                     pageSize: Option[Int] = None
                    )

case class DictItemQuery(
                          dictCode: Option[String],
                          value: Option[String],
                          display: Option[String],
                          orderNum: Option[Int],
                          dictId: Option[Int],
                          joinTime: Option[DateTime],
                          isDeleted: Option[Boolean],
                          updateTime: Option[DateTime],
                          id: Option[Int],
                          page: Option[Int] = None,
                          pageSize: Option[Int] = None
                        )

case class DictWithDictItem(dictCode: String,
                            dictName: String,
                            dictType: String,
                            joinTime: Option[DateTime],
                            isDeleted: Boolean = false,
                            dictDescription: Option[String] = None,
                            id: Option[Int] = None,
                            updateTime: Option[DateTime] = None,
                            addDictItems: Option[Seq[DictItem]] = None,
                            updateDictItems: Option[Seq[DictItem]] = None,
                            removeDictItems: Option[Seq[DictItem]] = None)
